#include"head.h"

void Add(Information s[], int n,int i)/*添加信息*/
{
	Add_I(s, i);
	Add_M(s, i);
	Add_D(s, i);
		
	printf("\n");
	
	return ;	
}

void Add_I(Information s[], int i)
{
	fflush(stdin);
	printf("姓名：");
	gets(s[i].name);
	
	JudgeGender(s, i);
	
	printf("出生日期：");
	gets(s[i].birth);
	
	JudgeDay(s, i);
	
	fflush(stdin);
	printf("所属部门:");
	gets(s[i].section);
	printf("人员类别:");
	gets(s[i].personnelcategory);
	printf("技术等级:");
	gets(s[i].grade);
	printf("技术职称:");
	gets(s[i].titles);
	printf("文化程度:");
	gets(s[i].culturestandard);
	printf("民族:");
	gets(s[i].nation);
	printf("籍贯:");
	gets(s[i].nativeplace);
	printf("现住地址:");
	gets(s[i].Address);
	
	printf("\n");
		
	return ;
}

void Add_M(Information s[], int i)
{
	printf("基本工资：");
	scanf("%d",&s[i].base);
	printf("岗位津贴：");
	scanf("%d",&s[i].job);
	printf("物价补贴：");
	scanf("%d",&s[i].price);
	printf("职务补贴:");
	scanf("%d",&s[i].post);
	printf("住房补贴:");
	scanf("%d",&s[i].live);
	printf("房租:");
	scanf("%d",&s[i].chummage);
	printf("事假扣费:");
	scanf("%d",&s[i].thing);
	printf("旷工扣费:");
	scanf("%d",&s[i].free);
	printf("其他扣款:");
	scanf("%d",&s[i].other);
	printf("加班费：");
	scanf("%d",&s[i].overtime);
	printf("夜班费：");
	scanf("%d",&s[i].night_differential);
	
	
	printf("\n");
	
	return ;
}

void Add_D(Information s[], int i)
{
	printf("出勤天数:");
	scanf("%d",&s[i].work);
	printf("工伤天数:");
	scanf("%d",&s[i].injury);
	printf("产假天数:");
	scanf("%d",&s[i].maternityleave);
	printf("病假天数:");
	scanf("%d",&s[i].ill);
	printf("旷工天数:");
	scanf("%d",&s[i].free_work);
	printf("事假天数:");
	scanf("%d",&s[i].busy_thing);
	printf("加班天数:");
	scanf("%d",&s[i].add_work);
	printf("夜班天数:");
	scanf("%d",&s[i].night);
	
	printf("\n");
	
	return ;
}

